﻿using System;
using System.Collections.Generic;
using System.Linq;
using FLH.RegionDataAllocations;
using MyFloridaHouse.libSvDTO;
using MyFloridaHouse.DataAccess.ExtensionsTS;


namespace MyFloridaHouse.DataAccess
{
    //public static class RegionDataAllocationsSourceWrapper
    //{
    //    static readonly RegionDataAllocationsSource allocationsSource = new RegionDataAllocationsSource();

    //    public static List<RegionDataAllocationsModel> GetAllocations(string prefix, int targetLayerID, int targetRegionID)
    //    {
    //        return allocationsSource.Read(prefix, targetLayerID, targetRegionID).ToList();
    //    }
    //}


    //public partial class DAL_CensusData
    //{


    //    public List<RegionDataAllocationsDTO> GetRegionDataAllocations(int sourceLayerID, int targetLayerID, int targetRegionID)
    //    {
    //        string prefix = DAL_Global.GetPrefixFromLayerID(sourceLayerID);

    //        try
    //        {
    //            List<RegionDataAllocationsModel> itemList = RegionDataAllocationsSourceWrapper.GetAllocations(prefix, targetLayerID, targetRegionID);
    //            return ConvertRegionDataAllocationsModelToRegionDataAllocationsDTO.convertList(itemList);
    //        }
    //        catch (Exception ex)
    //        {
    //            // todo: enable logging for GetAllocations
    //            //LogProcess("GetAllocations", ex.Message);

    //            return null;
    //        }
    //    }

    //}
}
